<%-- 
    Document   : orderDetails
    Created on : May 10, 2012, 9:49:48 AM
    Author     : ciummo
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>

<script type="text/javascript" src="/DGestWebServer/SCRIPT/jquery-1.6.2.js"></script>
<script type="text/javascript" src="/DGestWebServer/SCRIPT/Ajax.js"></script>

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link rel="stylesheet" type="text/css" href="/DGestWebServer/css/dgest.css"/>
        <title><bean:message key="order.title.details"/></title>        
    </head>
    <body>
        <%@ include file="../adminDialogBar.jspf" %> 
        
        
         

            <div id="subMenu">
                
                <logic:equal name="LoginActionForm" property="role" value="Admin Dialog" scope="session">
                
                


                    <html:link href="Order.do?method=modifyOrder" paramId="idOrder" paramName="OrderActionForm" paramProperty="idOrdine"><img src="/DGestWebServer/images/orderEdit.png" alt="Modifica l'Ordine" height="125px" width="125px" title="Modifica Ordine"/></html:link>
                    <html:link href="Order.do?method=deleteOrder" paramId="idOrder" paramName="OrderActionForm" paramProperty="idOrdine"><img src="/DGestWebServer/images/orderDelete.png" alt="Elimina l'Ordine" height="125px" width="125px"title="Elimina Ordine"/></html:link>
                </logic:equal>
                    
                <html:link href="Order.do?method=setReady" paramId="idOrder" paramName="OrderActionForm" paramProperty="idOrdine"><img src="/DGestWebServer/images/orderReady.png" alt="Ordine Pronto" height="125px" width="125px" title="Imposta Come Pronto"/></html:link>
                
            </div>         
         </br>
         
         
         
         
         <h2><bean:message key="order.title.details"/></h2>


                
         
         
         </br>
        <table class="objectDetails">

            <tr>
                <th><bean:message key="order.id"/>: </th>
                <td><bean:write name="OrderActionForm" property="idOrdine"/></td>
            </tr>       

            <tr>
                <th>Data di Evasione: </th>
                <td><bean:write name="OrderActionForm" property="dataEvasione"/></td>
            </tr>       

            <tr>
                <th><bean:message key="order.paymentType"/>: </th>
                <td><bean:write name="OrderActionForm" property="tipoPagamento"/></td>
            </tr>       

            <tr>
                <th><bean:message key="order.shipping"/>: </th>
                <td><bean:write name="OrderActionForm" property="resoFranco"/></td>
            </tr>         

            <tr>
                <th><bean:message key="order.state"/>: </th>
                <td><bean:write name="OrderActionForm" property="stato"/></td>
            </tr>          

            <tr>
                <th><bean:message key="order.note"/>: </th>
                <td><bean:write name="OrderActionForm" property="note"/></td>
            </tr>                      

            <tr>

                <logic:notPresent name="AllegatoOrdine">
                    <html:form action="Annex?method=upload&type=Ordine" method="POST" enctype="multipart/form-data">


                        <th>Ordine: <html:file name="AnnexActionForm" property="file"></html:file></th>
                        <td>


                        <html:submit>
                            Carica
                        </html:submit>

                        </td>

                    </html:form>
                </logic:notPresent>
                
                <logic:present name="AllegatoOrdine">
                    <th>
                        Ordine: <html:link href="Annex.do?method=download" paramId="idAnnex" paramName="AllegatoOrdine" paramProperty="idAllegato"><bean:write name="AllegatoOrdine" property="nomeFile"/></html:link>
                    </th>

                    <td>
                        
                        <html:link href="Annex.do?method=delete" paramId="idAnnex" paramName="AllegatoOrdine" paramProperty="idAllegato"><img src="/DGestWebServer/images/erase.png" alt="Rimuovi Ordine" height="20px" width="20px" title="Rimuovi Documento Ordine"/></html:link>
                    </td>
                </logic:present>
                
                
            </tr>
            
            
            <tr>

                <logic:notPresent name="AllegatoFattura">
                    <html:form action="Annex?method=upload&type=Fattura" method="POST" enctype="multipart/form-data">


                        <th>Fattura: <html:file name="AnnexActionForm" property="file"></html:file></th>
                        <td>


                        <html:submit>
                            Carica
                        </html:submit>

                        </td>

                    </html:form>
                </logic:notPresent>
                
                <logic:present name="AllegatoFattura">
                    <th>
                        Fattura: <html:link href="Annex.do?method=download" paramId="idAnnex" paramName="AllegatoFattura" paramProperty="idAllegato"><bean:write name="AllegatoFattura" property="nomeFile"/></html:link>
                    </th>

                    <td>
                        
                        <html:link href="Annex.do?method=delete" paramId="idAnnex" paramName="AllegatoFattura" paramProperty="idAllegato"><img src="/DGestWebServer/images/erase.png" alt="Rimuovi Fattura" height="20px" width="20px" title="Rimuovi Documento Fattura"/></html:link>
                    </td>
                </logic:present>
                
                
            </tr>
            
            <tr>

                <logic:notPresent name="AllegatoBolla">
                    <html:form action="Annex?method=upload&type=Bolla" method="POST" enctype="multipart/form-data">


                        <th>Bolla: <html:file name="AnnexActionForm" property="file"></html:file></th>
                        <td>


                        <html:submit>
                            Carica
                        </html:submit>

                        </td>

                    </html:form>
                </logic:notPresent>
                
                <logic:present name="AllegatoBolla">
                    <th>
                        Bolla: <html:link href="Annex.do?method=download" paramId="idAnnex" paramName="AllegatoBolla" paramProperty="idAllegato"><bean:write name="AllegatoBolla" property="nomeFile"/></html:link>
                    </th>

                    <td>
                        
                        <html:link href="Annex.do?method=delete" paramId="idAnnex" paramName="AllegatoBolla" paramProperty="idAllegato"><img src="/DGestWebServer/images/erase.png" alt="Rimuovi Bolla" height="20px" width="20px" title="Rimuovi Documento Bolla"/></html:link>
                    </td>
                </logic:present>
            </tr>            
        </table>    
        
        

                </br>
                
                <logic:equal name="LoginActionForm" property="role" value="Admin Dialog" scope="session">
                <html:link href="OrderProduct.do?method=newOrderProduct" paramId="idOrder" paramName="OrderActionForm" paramProperty="idOrdine"><img src="/DGestWebServer/images/addArticleOrder.png" alt="Aggiungi un Articolo All'Ordine" height="125px" width="125px" title="Aggiungi un Articolo All'Ordine"/></html:link>
                </logic:equal>
                
                
                <h2><bean:message key="order.productList"/></h2>
                </br>
                <table class="objectList">
                        <thead>
                            <tr>
                                <th>Codice</th>
                                <th>Nome Articolo</th>
                                <th><bean:message key="productOrder.quantity"/></th>
                                <th><bean:message key="productOrder.state"/></th>

                                <th></th>
                            </tr>
                        </thead>

                        <tbody>

                            <logic:iterate id="orderProduct" name="OrderProductActionForm" property="listOrderProductForm" indexId="index" >
                                <pg:item>
                                    <tr>
                                        
                                        <th><bean:write name="orderProduct" property="codArticolo"></bean:write></th>
                                        <td><bean:write name="orderProduct" property="nomeArticolo"></bean:write></td>
                                        <td><bean:write name="orderProduct" property="quantita"></bean:write></td>
                                        <td><bean:write name="orderProduct" property="stato"></bean:write></td>

                                        <td><html:link href="OrderProduct.do?method=orderProductDetails" paramId="idOrderProduct" paramName="orderProduct" paramProperty="idOrdineProdotto"><img src="/DGestWebServer/images/articleOrderView.png" alt="Visualizza Articolo Ordine" height="25px" width="25px"/></html:link></td>
                                        
                                    </tr>    
                                </pg:item>
                            </logic:iterate>

                        </tbody>
                    </table>  
        
                            </br>
                            
               <h2> Lista Report </h2>
               
               </br>
               
                <table class="objectList">
                        <thead>
                            <tr>
                                <th>data</th>
                                <th>tipo</th>
                                <th>utente</th>
                                <th></th>
                            </tr>
                        </thead>

                        <tbody>

                            <logic:iterate id="report" name="ReportActionForm" property="list" indexId="index" >
                                <pg:item>
                                    <tr>
                                        
                                        <td><bean:write name="report" property="data"></bean:write></td>
                                        <td><bean:write name="report" property="tipo"></bean:write></td>
                                        <td><bean:write name="report" property="idUtente"></bean:write></td>
                                        <td><bean:write name="report" property="messaggio"></bean:write></td>                                        
                                    </tr>    
                                </pg:item>
                            </logic:iterate>

                        </tbody>
                    </table>   
        
        </div>
    </body>
</html>
